<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>文件服务</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
	<script type="text/javascript">
		function get(){
			var fileType = $("#FileType").val();
			$.post( window.location.href +"/allocation", {FileType:fileType}, function(data) {
  					$("#FileId").val(data);
				});
		}
	</script>	
  </head>
  
  <body>
   	 <center>文件测试服务</center><br/>
   	 <h6>--------------------------占位文件-------------------------------</h6>
         文件类型:<select name="FileType" id="FileType">   
        			<option value="template">模板文件</option>   
        			<option value="common">普通文件</option>
      			</select>
      			<br/>
      	文件ID:<input type = "text" id = "FileId"/>		
      	<input type="button" value="获取" id = "get" onclick="get()"/>		   
   	 <h6>--------------------------文件上传-------------------------------</h6>
   	 <form action="fileServer" method="post" enctype="multipart/form-data">
   	 	文件ID:<input type = "text" name = "FileId"/> <br/>
   	 	文件:<input type="file" name = "File"/> <br/>
   	 	<input type="submit" value="上传">
   	 </form>
   	 <br/>
   	 <br/>
   	 <h6>--------------------------文件下载-------------------------------</h6>
   	 <form action="fileServer" method="get" enctype="multipart/form-data">
   	 	文件ID:<input type = "text" name = "FileId"/> <br/>
   	 	<input type="submit" value="下载">
   	 </form>
  </body>
</html>
